package com.contest.service.impl;

import com.contest.dao.BettingRecordDao;
import com.contest.entity.BettingRecord;
import com.contest.service.BettingRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;

/**
 * <p>
 * ${table.comment}  服务实现类
 * </p>
 *
 * @author liuyf
 * @since ${date}
 */
@Service
public class BettingRecordServiceImpl extends  ServiceImpl<BettingRecordDao, BettingRecord> implements BettingRecordService {

    @Autowired
    BettingRecordDao bettingRecordDao;

    /**
     * 用户当日下注总额
     *
     * @param userId
     */
    @Override
    public Float getTodayByUserId(String userId) {
        return bettingRecordDao.getTodayByUserId(userId);
    }

    /**
     * 用户当月下注总额
     *
     * @param userId
     */
    @Override
    public Float getMonByUserId(String userId) {
        return bettingRecordDao.getMonByUserId(userId);
    }

    /**
     * 用户当日赢总额
     *
     * @param userId
     */
    @Override
    public Float getTodayWinByUserId(String userId) {
        return bettingRecordDao.getTodayWinByUserId(userId);
    }

    /**
     * 用户当日输总额
     *
     * @param userId
     */
    @Override
    public Float getTodayLoseByUserId(String userId) {
        return bettingRecordDao.getTodayLoseByUserId(userId);
    }

    /**
     * 用户当月赢总额
     *
     * @param userId
     */
    @Override
    public Float getMonWinByUserId(String userId) {
        return bettingRecordDao.getMonWinByUserId(userId);
    }

    /**
     * 用户当月输总额
     *
     * @param userId
     */
    @Override
    public Float getMonLoseByUserId(String userId) {
        return bettingRecordDao.getMonLoseByUserId(userId);
    }

}
